<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018-09-29
 * Time: 13:48
 */

namespace backend\controllers;
use app\models\AuthItemChild;
use app\models\CrmFrontPermission;
use app\models\CrmSystemGsxx;
use app\models\Mylogs;
use app\models\search\CrmHwzxHistorySearch;
use app\models\search\MylogsSearch;
use common\helps\Tools;
use mdm\admin\components\Configs;
use mdm\admin\components\Helper;
use mdm\admin\models\AuthItem;
use mdm\admin\models\Route;
use mdm\admin\models\searchs\AuthItem as AuthItemSearch;
use yii\base\Object;
use yii\helpers\ArrayHelper;
use yii\rbac\Item;

class DataLogsController extends CommonController
{

    public function actionList()
    {
        $myLogs = new CrmHwzxHistorySearch();
        $res = $myLogs->search(\Yii::$app->request->post());
        $count = $res->query->count();
        $res->query->limit($_POST['limit']);
        $res->query->offset($_POST['limit']*($_POST['page']-1));
        $resArr = $res->query->asArray()->all();
        return $this->actionLayData($count,$resArr);
    }

}